{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>移动文件</title>
    <link rel="stylesheet" type="text/css" href="{% static 'bootstrap-3.3.7-dist/css/bootstrap.min.css' %}">
</head>
<body>
        <form method="post" href="{% url "file_manage:move_file" file.pk %}">
        {% csrf_token %}
    <h2>>准备移动文件 <a href="{{ file.get_url }}">「{{ file.name }}」</a></h2>
    <div>
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>#</th>
                <th>文件夹（为空则为主文件夹）</th>
                <th>选择</th>
            </tr>
        </thead>
        <tbody>
            {% for tmp in directory %}
            <tr>
                <th>#</th>
                <th>{{ tmp.path }}</th>
                <th>
                    {% if file.parent != tmp %}
                        <div class="radio">
                          <label>
                            <input type="radio" name="optionsRadios" id="optionsRadios2" value="{{ tmp.pk }}">
                          </label>
                        </div>
                    {% else %}
                        <div class="radio">
                          <label>
                            <input type="radio" name="optionsRadios" id="optionsRadios2" value="{{ tmp.pk }}" disabled>
                              文件当前目录
                          </label>
                        </div>
                    {% endif %}
                </th>
            </tr>
            {% endfor %}

        </tbody>
    </table>
    </div>
        <div>
             <button class="btn" onclick="checkboxed_t()" >我确定</button>
             <a href="{{ file.get_url }}">返回</a>
        </div>
        </form>
        {% if messages %}
            <script>
                {% for msg in messages %}
                    alert('{{ msg.message }}');
                {% endfor %}
            </script>
        {% endif %}
</body>
</html>